package Thread;

/**
 * @className: CreateThread2
 * @author: 芃
 * @description: 通过实现Runnable接口
 * @date: 2024/1/14 13:09
 */
class MyRunnable implements Runnable {

    @Override
    public void run() {
        System.out.println("hello");
    }
}
public class CreateThread2 {
    public static void main(String[] args) {
        Runnable runnable = new MyRunnable();
        Thread thread = new Thread(runnable);
        thread.start();
        thread.getState();
    }
}
